package cn.edu.just.firstjavaapp.l20;

import javax.swing.*;
import java.awt.*;

public class FlowLayoutDemo {
    public static void main(String[] args) {
        JFrame frame = new JFrame();
        frame.setBounds(100,100,400,300);

        frame.setLayout(new FlowLayout());

        JButton button1 = new JButton("按钮1");
        frame.add(button1);

        JButton button2 = new JButton("按钮2");
        frame.add(button2);

        JButton button3 = new JButton("按钮3");
        frame.add(button3);

        JButton button4 = new JButton("按钮4");
        frame.add(button4);

        frame.setVisible(true);
    }
}
